package cn.kgc.vueprohou.controller;

import cn.kgc.vueprohou.pojo.ResultEntity;
import cn.kgc.vueprohou.pojo.Takeout;
import cn.kgc.vueprohou.service.TakeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@CrossOrigin
@RestController
@Api(tags = "出库表相关接口",description = "提供用户相关的Rest API")
public class TakeController {
  @Resource
    TakeService takeService;

  @ApiOperation("增加出库")
  @RequestMapping(value = "/insertTake",produces = "application/json;charset=UTF-8")
  public ResultEntity<String> insertTake(Integer count,String handler){
      Takeout takeout=new Takeout();
      takeout.setQuantity(count);
      takeout.setHandler(handler);
      Integer insert = takeService.insert(takeout);
  return ResultEntity.successWithoutData(insert+"");
  }
}
